package pl.word.app.controller;

import javax.enterprise.inject.Model;
import javax.inject.Inject;

import org.hibernate.validator.engine.ValueContext;
import org.jboss.seam.security.annotations.LoggedIn;

import pl.word.app.security.annotation.Admin;
import pl.word.app.security.annotation.User;

import pl.word.domain.model.CalendarModelItem;
import pl.word.domain.model.Project;
import pl.word.domain.service.ProjectService;

@Model
public class MyAction {


	private CalendarModelItem calendarModelItem = new CalendarModelItem();


	private Project project = new Project();
	
	@Inject
	ProjectService projectService;
	
	
	

	public void actionAll() {
		
		System.out.println("@@@@@@@@@@@@@@@ All");
	}

	@LoggedIn
	public void actionLogged() {
		System.out.println("@@@@@@@@@@@@@@@ Logged");
	}

	@Admin
	public String actionAdmin() {
		System.out.println("@@@@@@@@@@@@@@@ Admin");
		return "adminstore";
	}

	@User
	public void actionUser() {
		System.out.println("@@@@@@@@@@@@@@@ User");
	}

	public Project getProject() {
		return project;
	}

	public void setProject(Project project) {
		this.project = project;
	}
	public String showAdminStore (){
		return "adminstore";
	}
	public void addProject(){
	  project = new Project();
	}
	
	public String showCalendar (){
		return "calendar";
	}

	public CalendarModelItem getCalendarModelItem() {
		return calendarModelItem;
	}

	public void setCalendarModelItem(CalendarModelItem calendarModelItem) {
		this.calendarModelItem = calendarModelItem;
	}
	
	
}


